$prefix-cls: '#{$tonyname}-multiple-tabs';

.#{$prefix-cls} {
  position: relative;
  z-index: 10;
  background: var(--background-primary-color);

  &-content {
    height: 100%;

    .el-dropdown--default {
      height: 100%;
    }

    &__contextmenu {
      white-space: nowrap;
    }

    .el-dropdown-menu__item--divided::before {
      display: none;
    }

    &__info {
      display: flex;
      align-items: center;
      height: 100%;
      padding: 0 6px 0 16px;

      &-text {
        font-size: 14px;
        color: var(--text-primary-color);
      }
    }
  }

  &__extra {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;

    &-btn {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      width: var(--tabs-height);
      height: var(--tabs-height);
      cursor: pointer;

      &:hover {
        color: var(--primary-color);
        background: var(--background-regular-color);
      }
    }

    .el-dropdown {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
      color: inherit;
    }

    &--text {
      position: relative;
    }

    &--icon {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
    }
  }
}

.#{$prefix-cls} .el-tabs {
  &__active-bar,
  &__content {
    display: none;
  }
}

.#{$prefix-cls} .el-tabs .el-tabs__header {
  margin: 0;
  overflow: hidden;

  .el-tabs__nav {
    &-wrap {
      padding-right: 142px;
      padding-left: 6px;
      margin: 0;

      &::after {
        height: 1px;
      }

      &.is-scrollable {
        padding-right: 162px;
        padding-left: 24px;
      }
    }

    &-prev,
    &-next {
      top: -2px;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 20px;
      height: 100%;
      color: var(--el-text-color-primary);

      &:hover {
        color: var(--primary-color);
        background: var(--el-color-primary-light-9);
      }
    }

    &-prev {
      left: 2px;
    }

    &-next {
      right: 136px;
    }

    .el-tabs__item {
      position: relative;
      display: inline-flex;
      align-items: center;
      height: var(--tabs-height);
      padding: 0 24px;
      margin-right: -18px;
      line-height: var(--tabs-height);
      text-align: center;
      border: none;
      outline: none;
      mask: url('');
      mask-size: 100% 100%;
      transition: all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);

      .is-icon-close {
        width: 0;
        line-height: 1;
        visibility: hidden;
        opacity: 0;
        transition: all 0.1s linear;

        &:hover {
          color: #fff;
          transition: all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);
        }

        > svg {
          width: 14px;
          height: 14px;
        }
      }

      &:hover,
      &.is-active {
        position: relative;
        z-index: 1;
        color: var(--primary-color);

        &::after {
          position: absolute;
          inset: 0;
          z-index: -1;
          content: '';
          background: var(--primary-bg-color);
          opacity: 0.8;
        }

        .is-icon-close {
          width: 16px;
          height: 16px;
          line-height: 1;
          visibility: visible;
          opacity: 1;
        }
      }
    }
  }

  .el-dropdown {
    color: inherit;
  }
}
